package com.iflytek.universitymanagement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iflytek.universitymanagement.domain.Admin;
import com.iflytek.universitymanagement.domain.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author louyp
 * @since 2024-11-26
 */
@Mapper
public interface AdminMapper extends BaseMapper<Admin> {

    /**
     * 根据姓名查询所有
     * */
    @Select("SELECT * FROM admin WHERE name = #{name}")
    Admin selectByAdminName(String name);

    @Insert("insert into `admin` ( name, password, phone,email) " +
            "values (#{name}, #{password}, #{phone}, #{email})")
    void insertAdmin(Admin admin);


}
